2200
How can I delete the selected items (including descendants)

// KeyDown event - Occurs when the user presses a key while an object has the focus.
procedure TWinForm1.AxG2antt1_KeyDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent);
begin
	with AxG2antt1 do
	begin
		RemoveSelection();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		SelBackColor := $f0f0f0;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Nil,Nil);
		h := AddItem('Task 2');
		AddBar(h,'Task','8/3/2017','8/9/2017',Nil,Nil);
		SelectItem[h] := True;
		h := AddItem('Task 3');
		AddBar(h,'Task','8/4/2017','8/13/2017','',Nil);
		SelectItem[h] := True;
		AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Nil,Nil);
	end;
	EndUpdate();
end
2199
Dark mode

with AxG2antt1 do
begin
	BeginUpdate();
	back := 65536;
	fore := 16777215;
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQg' + 
	'mPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThd' + 
	'r4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA');
	VisualAppearance.Add(2,'gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4bi' + 
	'aKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA');
	VisualAppearance.Add(3,'gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5Cj' + 
	'mG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKaxb' + 
	'buaaXLhGCYBgIA==');
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Bump;
	BackColor := back;
	BackColorHeader := back;
	BackColorLevelHeader := back;
	BackColorSortBar := back;
	BackColorSortBarCaption := back;
	FilterBarBackColor := back;
	FilterBarForeColor := fore;
	ForeColor := fore;
	ForeColorHeader := fore;
	ForeColorSortBar := fore;
	SelBackColor := fore;
	SelForeColor := back;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$2000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exToolTipAppearance,$3000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exToolTipBackColor,back);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exToolTipForeColor,fore);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSelBackColorFilter,fore);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSelForeColorFilter,back);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exBackColorFilter,back);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exForeColorFilter,fore);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSortBarLinkColor,back);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCSplitBar,$2000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSplitBar,$2000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exTreeLinesColor,fore);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exScrollSizeGrip,back);
	set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarExclude,'<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>');
	with Chart do
	begin
		BackColor := back;
		BackColorLevelHeader := back;
		ForeColor := fore;
		ForeColorLevelHeader := fore;
	end;
	EndUpdate();
end
2198
I have changed the font, but the item's height remains the same. What I am doing wrong

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	LoadXML('http://www.exontrol.net/testing.xml');
	Font.Size := 22;
	HeaderHeight := 42;
	DefaultItemHeight := 36;
	Items.ItemHeight[0] := AxG2antt1.DefaultItemHeight;
	Chart.UnitWidth := AxG2antt1.DefaultItemHeight;
	Chart.UnitScale := AxG2antt1.Chart.UnitScale;
	Chart.Bars.Item['Task'].Height := 18;
	EndUpdate();
end
2197
I have changed from Project Summary Task to own task created with EBN to get a black frame then using different colors for project status. How can I enlarge the EBN being applied to the head-arrows shows the start/end margins of the range

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemBold[e.item] := True;
			AddBar(e.item,CellValue[TObject(e.item),TObject(GroupItem[e.item])],'12/2/2017','12/2/2017',Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil);
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCQBQAWCQ1DAJIqjOAkEhiGCUQClYYZBjWG4dQLOEYTNC' + 
	'8WwHCIZBpEWgKChGKAlSANMjTZLkdR1ECmIhoSg4coKMoERBJco1BDdOQGAyEQShEC4fgmVwAP7aNoWVC1JynM6XaKmGbJAA6CZgQKGFh2LAdTzSf61cAtWpaUjmRZaY' + 
	'SAFDxpiCYpfQjdUB2JDVfTVP6LbawS4KZgOR5eRboETYeAFcSZGrNMKEXLLSyudKRRreWQaPpGCZTRSUdZxSrbBhvEqlbRNMhwSBEEigNIxToOU4jFgeCROQwQRK9BBo' + 
	'G0CQUEIdhAAyJJvjUeZdmmb5+C8HhiAeZJznoPQ+EgT4rlua4BjCfg+k8d5TkUCZ4w+fxfB+X5xn4fheGebZoH8X53koAR9CASAWAUfofjgJgKH+IJHnGcIDmER5iBEe' + 
	'ZgmgVgLgGYYYGoFRTCGaIGAYRYiCiFgmgmYQEF4KIKmKSBRBqCxjAiRgvgwYxIiGQYNmOCJlDUOpeAQBCAg=');
		Add(2,'CP:1 -6 0 6 0');
	end;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 342;
		Bars.Add('S1').Color := $1000000;
		Bars.Add('S2').Color := $2ff0000;
	end;
	with Columns do
	begin
		Add('C1');
		(Add('C2') as EXG2ANTTLib.Column).AllowSort := False;
	end;
	SingleSort := False;
	AllowGroupBy := True;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	with Items do
	begin
		CellValue[TObject(AddItem('S1')),TObject(1)] := 'SubItem A.1';
		CellValue[TObject(AddItem('S1')),TObject(1)] := 'SubItem A.1';
		CellValue[TObject(AddItem('S2')),TObject(1)] := 'SubItem B.1';
		CellValue[TObject(AddItem('S2')),TObject(1)] := 'SubItem B.1';
	end;
	Layout := 'MultipleSort = "C0:2"';
	EndUpdate();
end
2196
How can I specify the cell's outline, border or lines around, when the cell gets selected

with AxG2antt1 do
begin
	BeginUpdate();
	AttachTemplate('handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}');
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHI' + 
	'MQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqO' + 
	'p6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYn' + 
	'jUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWY' + 
	'RoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=');
		Add(2,'CP:1 -4 0 0 0');
	end;
	(GetOcx() as EXG2ANTTLib.G2antt).SelBackColor := $2000000;
	SelForeColor := Color.FromArgb(0,0,1);
	FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel;
	ShowFocusRect := False;
	DefaultItemHeight := 24;
	HeaderHeight := 24;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		CellValue[TObject(AddItem('Cell 1')),TObject(1)] := 'Cell 2';
		CellValue[TObject(AddItem('Cell 3')),TObject(1)] := 'Cell 4';
	end;
	Items.SelectPos := TObject(1);
	SelectColumnIndex := 1;
	EndUpdate();
end
2195
How can I specify the cell's outline, border or lines around, when the item gets selected

with AxG2antt1 do
begin
	BeginUpdate();
	AttachTemplate('handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}');
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHI' + 
	'MQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqO' + 
	'p6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYn' + 
	'jUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWY' + 
	'RoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=');
	(GetOcx() as EXG2ANTTLib.G2antt).SelBackColor := $1000000;
	SelForeColor := Color.FromArgb(0,0,1);
	ShowFocusRect := False;
	DefaultItemHeight := 24;
	HeaderHeight := 24;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		CellValue[TObject(AddItem('Cell 1')),TObject(1)] := 'Cell 2';
		CellValue[TObject(AddItem('Cell 3')),TObject(1)] := 'Cell 4';
		SelectPos := TObject(1);
	end;
	EndUpdate();
end
2194
How can I specify the cell's outline, border or lines around

with AxG2antt1 do
begin
	BeginUpdate();
	AttachTemplate('handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}');
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHI' + 
	'MQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqO' + 
	'p6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYn' + 
	'jUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWY' + 
	'RoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=');
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	ShowFocusRect := False;
	DefaultItemHeight := 24;
	HeaderHeight := 24;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		CellValue[TObject(AddItem('Cell 1')),TObject(1)] := 'Cell 2';
		h := AddItem('Cell 2');
		CellValue[TObject(h),TObject(1)] := 'Cell 3';
		CellBackColor[TObject(h),TObject(1)] := $1000000;
	end;
	EndUpdate();
end
2193
Is it possible to highligth the match while a filter is applied

// AddColumn event - Fired after a new column has been added.
procedure TWinForm1.AxG2antt1_AddColumn(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddColumnEvent);
begin
	// Column.Def(17) = 1
end;

// FilterChange event - Occurs when the filter was changed.
procedure TWinForm1.AxG2antt1_FilterChange(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		format := FormatABC('`value replace ''` + value + `'' with ''<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>''`',TObject(FilterBarPromptPattern),Nil,Nil);
		Columns.Item[TObject(0)].FormatColumn := format;
		Columns.Item[TObject(1)].FormatColumn := format;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	Columns.Add('Col 1');
	Columns.Add('Col 2');
	with Items do
	begin
		CellValue[TObject(AddItem('219 Smith')),TObject(1)] := 'Ignacio 1234';
		CellValue[TObject(AddItem('1666 County Road 309A')),TObject(1)] := '897 Manassa';
		CellValue[TObject(AddItem('38 Lone Pine')),TObject(1)] := 'Durango 11';
		CellValue[TObject(AddItem('612 Jachim Street')),TObject(1)] := 'Lamar 222';
	end;
	FilterBarPromptPattern := '1';
	FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible);
	FilterBarPromptType := Integer(EXG2ANTTLib.FilterPromptEnum.exFilterPromptCaseSensitive) Or Integer(EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAll);
	EndUpdate();
end
2192
How can I display the total/sum/aggregate in the same column, when the user groups by a column

// AddColumn event - Fired after a new column has been added.
procedure TWinForm1.AxG2antt1_AddColumn(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddColumnEvent);
begin
	with AxG2antt1 do
	begin
		with e.column do
		begin
		end;
	end
end;

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemDivider[e.item] := -1;
			ItemBackColor[e.item] := AxG2antt1.BackColorSortBar;
			ItemHeight[e.item] := AxG2antt1.HeaderHeight;
			CellMerge[TObject(e.item),TObject(0)] := '1,2,3,4,5,7,8,9,10,11,12';
			CellValue[TObject(e.item),TObject(13)] := 'count(current,rec,1)';
			CellValueFormat[TObject(e.item),TObject(13)] := Integer(EXG2ANTTLib.ValueFormatEnum.exTotalField) Or Integer(EXG2ANTTLib.ValueFormatEnum.exHTML);
			CellValue[TObject(e.item),TObject(0)] := TObject(CellCaption[TObject(e.item),TObject(GroupItem[e.item])]);
			FormatCell[TObject(e.item),TObject(0)] := '`<b>` + value + `</b> <font ;7><off 3><fgcolor=808080>(` + %13 +  `)`';
			CellValue[TObject(e.item),TObject(6)] := 'sum(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),TObject(6)] := Integer(EXG2ANTTLib.ValueFormatEnum.exTotalField) Or Integer(EXG2ANTTLib.ValueFormatEnum.exHTML);
			CellForeColor[TObject(e.item),TObject(6)] := $666666;
		end;
	end
end;

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	Indent := 12;
	ColumnAutoResize := False;
	ScrollBySingleLine := True;
	BackColorSortBar := Color.FromArgb(240,240,240);
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragScroll;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SingleSort := False;
	SortBarVisible := True;
	AllowGroupBy := True;
	HeaderHeight := 24;
	with Columns do
	begin
		(Add('Count') as EXG2ANTTLib.Column).Visible := False;
		with Item['Freight'] do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(AxG2antt1.BackColorSortBar);
			Def[EXG2ANTTLib.DefColumnEnum.exHeaderBackColor] := Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor];
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingRight] := TObject(4);
			Def[EXG2ANTTLib.DefColumnEnum.exCellPaddingLeft] := TObject(4);
			HeaderBold := True;
			AllowGroupBy := False;
			FormatColumn := 'value format ``';
			Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		end;
		with Item[TObject(0)] do
		begin
			AllowGroupBy := False;
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		end;
		Item['ShipCountry'].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	end;
	ScrollBySingleLine := False;
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exBottom] := 1;
		hL := LockedItem[EXG2ANTTLib.VAlignmentEnum.exBottom,0];
		ItemHeight[hL] := 24;
		ItemBold[hL] := True;
		ItemBackColor[hL] := AxG2antt1.BackColorSortBar;
		CellValue[TObject(hL),TObject(6)] := 'sum(all,rec,dbl(%6))';
		CellValueFormat[TObject(hL),TObject(6)] := Integer(EXG2ANTTLib.ValueFormatEnum.exTotalField) Or Integer(EXG2ANTTLib.ValueFormatEnum.exHTML);
		CellHAlignment[TObject(hL),TObject(6)] := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		FormatCell[TObject(hL),TObject(6)] := 'value format ``';
	end;
	EndUpdate();
end
2191
How do I add a total field locked at the bottom of the control

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine;
			FormatCell[TObject(e.item),TObject(GroupItem[e.item])] := 'value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`';
			CellValue[TObject(e.item),'Min'] := 'min(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Min'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			CellValue[TObject(e.item),'Max'] := 'max(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Max'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			CellValue[TObject(e.item),'Sum'] := 'sum(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Sum'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			ItemBackColor[e.item] := $f0f0f0;
		end;
	end
end;

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Show/Hide');
	ColumnsFloatBarSortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns;
	ColumnAutoResize := False;
	BackColorSortBar := Color.FromArgb(240,240,240);
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SingleSort := False;
	SortBarVisible := True;
	AllowGroupBy := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	with Columns do
	begin
		with (Add('Min') as EXG2ANTTLib.Column) do
		begin
			Visible := False;
			AllowDragging := False;
		end;
		var_Column := (Add('Max') as EXG2ANTTLib.Column);
		with var_Column do
		begin
			Visible := False;
			Visible := False;
			AllowDragging := False;
		end;
		var_Column1 := (Add('Sum') as EXG2ANTTLib.Column);
		with var_Column1 do
		begin
			Visible := False;
			Visible := False;
			AllowDragging := False;
		end;
	end;
	with Columns.Item['Freight'] do
	begin
		FormatColumn := 'currency(value)';
		Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(12895487);
		Def[EXG2ANTTLib.DefColumnEnum.exHeaderBackColor] := Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor];
		HeaderBold := True;
		AllowGroupBy := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	end;
	ScrollBySingleLine := False;
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exBottom] := 2;
		hL := LockedItem[EXG2ANTTLib.VAlignmentEnum.exBottom,0];
		ItemDivider[hL] := 0;
		ItemHeight[hL] := 3;
		ItemDividerLineAlignment[hL] := EXG2ANTTLib.DividerAlignmentEnum.DividerTop;
		ItemDividerLine[hL] := EXG2ANTTLib.DividerLineEnum.DoubleLine;
		hL := LockedItem[EXG2ANTTLib.VAlignmentEnum.exBottom,1];
		CellValue[TObject(hL),TObject(6)] := 'sum(all,rec,dbl(%6))';
		CellValueFormat[TObject(hL),TObject(6)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		ItemHeight[hL] := 24;
		ItemBold[hL] := True;
	end;
	Columns.Item['EmployeeID'].SortOrder := True;
	EndUpdate();
end
2190
How can I add a total field, when I use grouping

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine;
			FormatCell[TObject(e.item),TObject(GroupItem[e.item])] := 'value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`';
			CellValue[TObject(e.item),'Min'] := 'min(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Min'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			CellValue[TObject(e.item),'Max'] := 'max(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Max'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			CellValue[TObject(e.item),'Sum'] := 'sum(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Sum'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			ItemBackColor[e.item] := $f0f0f0;
		end;
	end
end;

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	BackColorSortBar := Color.FromArgb(240,240,240);
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SingleSort := False;
	SortBarVisible := True;
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := True;
	with Columns do
	begin
		(Add('Min') as EXG2ANTTLib.Column).Visible := False;
		(Add('Max') as EXG2ANTTLib.Column).Visible := False;
		(Add('Sum') as EXG2ANTTLib.Column).Visible := False;
	end;
	with Columns.Item['Freight'] do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(12895487);
		Def[EXG2ANTTLib.DefColumnEnum.exHeaderBackColor] := Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor];
		HeaderBold := True;
		AllowGroupBy := False;
	end;
	ScrollBySingleLine := False;
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exBottom] := 1;
		hL := LockedItem[EXG2ANTTLib.VAlignmentEnum.exBottom,0];
		ItemDivider[hL] := 0;
		ItemHeight[hL] := 24;
		ItemDividerLineAlignment[hL] := EXG2ANTTLib.DividerAlignmentEnum.DividerTop;
		ItemDividerLine[hL] := EXG2ANTTLib.DividerLineEnum.DoubleLine;
		CellValue[TObject(hL),TObject(0)] := 'sum(all,rec,dbl(%6))';
		CellValueFormat[TObject(hL),TObject(0)] := Integer(EXG2ANTTLib.ValueFormatEnum.exTotalField) Or Integer(EXG2ANTTLib.ValueFormatEnum.exHTML);
		CellHAlignment[TObject(hL),TObject(0)] := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		FormatCell[TObject(hL),TObject(0)] := '''Freight: <bgcolor=FFC4C4> ''+(value format ``) + ` `';
	end;
	EndUpdate();
end
2189
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Columns do
	begin
		Add('City');
		(Add('Start') as EXG2ANTTLib.Column).Visible := False;
		(Add('End') as EXG2ANTTLib.Column).Visible := False;
	end;
	set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Show/Hide');
	ColumnsFloatBarSortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns;
	EndUpdate();
end
2188
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

// Sort event - Fired when the control sorts a column.
procedure TWinForm1.AxG2antt1_Sort(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '1 apos ''''';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 4) = 0',Nil).BackColor := $f0f0f0;
	EndUpdate();
end
2187
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SingleSort := False;
	SortBarVisible := True;
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := True;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(0:= (1 rpos '''')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 2) != 0',Nil).BackColor := $f0f0f0;
	EndUpdate();
end
2186
I need to display sub-totals in the grouping items. Is there any solution on this

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemDivider[e.item] := -1;
			EnableItem[e.item] := False;
			CellValueFormat[TObject(e.item),TObject(AxG2antt1.TreeColumnIndex)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
			FormatCell[TObject(e.item),TObject(AxG2antt1.TreeColumnIndex)] := '%1';
			CellValueFormat[TObject(e.item),'Freight'] := Integer(EXG2ANTTLib.ValueFormatEnum.exTotalField) Or Integer(EXG2ANTTLib.ValueFormatEnum.exHTML);
			CellValue[TObject(e.item),'Freight'] := 'sum(current,dir,%6)';
			FormatCell[TObject(e.item),'Freight'] := '`<b>` + currency(value)';
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	BackColorSortBar := Color.FromArgb(240,240,240);
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	Columns.Item['ShipVia'].DisplayFilterButton := True;
	EndUpdate();
end
2185
I use a subtotal in exTop-Item, after grouping the item shows 0. What is the solution

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SingleSort := False;
	AllowGroupBy := True;
	SortBarVisible := True;
	BackColorSortBar := BackColor;
	Columns.Item[TObject(5)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	Columns.Item[TObject(6)].FormatColumn := 'currency(value)';
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 1;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0];
		ItemBackColor[h] := $f0f0f0;
		CellBackColor[TObject(h),TObject(6)] := $bebebe;
		CellValue[TObject(h),TObject(6)] := 'sum(all,rec,%6)';
		CellValueFormat[TObject(h),TObject(6)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
	end;
	Refresh();
	EndUpdate();
end
2184
How can I add multiple values/columns on the same line/item/row

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SortOnClick := EXG2ANTTLib.SortOnClickEnum.exNoSort;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	Indent := 13;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderHidden;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with Columns do
	begin
		Add('Items');
		(Add('Quantity') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
		(Add('Value') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
	end;
	with Items do
	begin
		h := AddItem('Items');
		CellValue[TObject(h),TObject(2)] := 'sum(current,dir,dbl(%1)*dbl(%2))';
		CellValueFormat[TObject(h),TObject(2)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		FormatCell[TObject(h),TObject(2)] := '`Total: `+ value';
		CellHAlignment[TObject(h),TObject(2)] := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		CellBold[TObject(h),TObject(2)] := True;
		CellEditorVisible[TObject(h),TObject(2)] := EXG2ANTTLib.EditorVisibleEnum.exEditorHidden;
		CellEditorVisible[TObject(h),TObject(1)] := EXG2ANTTLib.EditorVisibleEnum.exEditorHidden;
		h1 := InsertItem(h,Nil,'Item 1');
		CellValue[TObject(h1),TObject(1)] := TObject(10);
		CellValue[TObject(h1),TObject(2)] := TObject(3);
		h1 := InsertItem(h,Nil,'Item 2');
		CellValue[TObject(h1),TObject(1)] := TObject(20);
		CellValue[TObject(h1),TObject(2)] := TObject(4);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2183
Is it possible, to add more aggregate functions to grouping header

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			FormatCell[TObject(e.item),TObject(GroupItem[e.item])] := 'value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`';
			CellValue[TObject(e.item),'Min'] := 'min(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Min'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			CellValue[TObject(e.item),'Max'] := 'max(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Max'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
			CellValue[TObject(e.item),'Sum'] := 'sum(current,all,dbl(%6))';
			CellValueFormat[TObject(e.item),'Sum'] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		end;
	end
end;

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SingleSort := False;
	SortBarVisible := True;
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := True;
	with Columns do
	begin
		(Add('Min') as EXG2ANTTLib.Column).Visible := False;
		(Add('Max') as EXG2ANTTLib.Column).Visible := False;
		(Add('Sum') as EXG2ANTTLib.Column).Visible := False;
	end;
	EndUpdate();
end
2182
Is it possible to display more aggregate functions to a single cell (method 2)

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SortOnClick := EXG2ANTTLib.SortOnClickEnum.exNoSort;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	Indent := 13;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderHidden;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with Columns do
	begin
		Add('Items');
		(Add('Quantity') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
		(Add('Sum') as EXG2ANTTLib.Column).Visible := False;
		(Add('Min') as EXG2ANTTLib.Column).Visible := False;
		(Add('Max') as EXG2ANTTLib.Column).Visible := False;
	end;
	with Items do
	begin
		h := AddItem('Items');
		CellMerge[TObject(h),TObject(0)] := TObject(1);
		FormatCell[TObject(h),TObject(0)] := '`Items, <b>sum(` + %2 + `), min(` + %3 + `), max(` + %4 + `)</b>`';
		CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
		CellValue[TObject(h),TObject(2)] := 'sum(current,dir,dbl(%1))';
		CellValueFormat[TObject(h),TObject(2)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		CellValue[TObject(h),TObject(3)] := 'min(current,dir,dbl(%1))';
		CellValueFormat[TObject(h),TObject(3)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		CellValue[TObject(h),TObject(4)] := 'max(current,dir,dbl(%1))';
		CellValueFormat[TObject(h),TObject(4)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		CellValue[TObject(InsertItem(h,Nil,'Item 1')),TObject(1)] := TObject(10);
		CellValue[TObject(InsertItem(h,Nil,'Item 2')),TObject(1)] := TObject(20);
		CellValue[TObject(InsertItem(h,Nil,'Item 3')),TObject(1)] := TObject(30);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2181
How can I use the current in the aggregate/total field

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SortOnClick := EXG2ANTTLib.SortOnClickEnum.exNoSort;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	Indent := 13;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderHidden;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with Columns do
	begin
		Add('Items');
		(Add('Quantity') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
	end;
	with Items do
	begin
		h := AddItem('Items');
		CellValue[TObject(h),TObject(1)] := 'sum(current,dir,dbl(%1))';
		CellValueFormat[TObject(h),TObject(1)] := EXG2ANTTLib.ValueFormatEnum.exTotalField;
		FormatCell[TObject(h),TObject(1)] := '`Total: `+ value';
		CellValue[TObject(InsertItem(h,Nil,'Item 1')),TObject(1)] := TObject(10);
		CellValue[TObject(InsertItem(h,Nil,'Item 2')),TObject(1)] := TObject(20);
		CellValue[TObject(InsertItem(h,Nil,'Item 3')),TObject(1)] := TObject(30);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2180
The CellValue/CellCaption property gets the result of a computed/total field with text formatting. Is it possible to get that value without text formatting

with AxG2antt1 do
begin
	BeginUpdate();
	(Columns.Add('A') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
	(Columns.Add('B') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
	Columns.Add('A+B');
	with Items do
	begin
		h := AddItem(TObject(10));
		CellValue[TObject(h),TObject(1)] := TObject(20);
		CellValueFormat[TObject(h),TObject(2)] := EXG2ANTTLib.ValueFormatEnum.exComputedField;
		CellValue[TObject(h),TObject(2)] := 'currency(dbl(%0)+dbl(%1))';
		OutputDebugString( 'CellCaption returns ' );
		OutputDebugString( CellCaption[TObject(h),TObject(2)] );
		OutputDebugString( 'CellValue returns ' );
		OutputDebugString( CellValue[TObject(h),TObject(2)] );
		OutputDebugString( 'ComputeValue returns ' );
		OutputDebugString( ComputeValue['dbl(%0)+dbl(%1)',TObject(h),TObject(0),TObject(CellValueFormat[TObject(h),TObject(2)])] );
	end;
	EndUpdate();
end
2179
Can I get the result of a specified formula as your control does using the ComputedField property
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('A');
	Columns.Add('B');
	with Items do
	begin
		h := AddItem(TObject(10));
		CellValue[TObject(h),TObject(1)] := TObject(20);
		OutputDebugString( 'A+B is ' );
		OutputDebugString( ComputeValue['dbl(%0)+dbl(%1)',TObject(h),TObject(0),TObject(2)] );
	end;
	EndUpdate();
end
2178
Is it possible to get the text without HTML formatting
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('');
	with Items do
	begin
		h := AddItem('<b>bold</b>');
		OutputDebugString( ComputeValue[CellValue[TObject(h),TObject(0)],TObject(h),TObject(0),TObject(1)] );
	end;
	EndUpdate();
end
2177
Transparent/Border SummaryBar

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine;
			AddBar(e.item,'Summary','12/2/2017','12/2/2017',Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil);
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABHEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKMIziaQJiYLBIaRgEUTRXASCQxDBKQBSeKkRRtDaOYDnGQYDi' + 
	'CIouQLEIxDKItBSJCKURJkAZZHjeToSR5PMb0dKdAw5I6raShEaaIiqJIXP7Fc7QSA0EgTBIFajgOpQAb+bptW7FVDULTMQS5FCZKasOA7FgOZ4DWjUVpwTZ1Q4LC65b' + 
	'juaraawKbYbXrFYJQSA8EwjNjDcLuKqcKpvDJsSJIFKxOB2KYtBLMLbzLR5apjLZ0QLSOKRDoMEgRDYGdKjLScGrGao8ABtcBlAZJRjoOo5DJgeCQapUQhNczGQzQSIi' + 
	'BOJZAFSQwRHcJhGh2BZvngMIeA8H4TksA5ylgZBeg8X4GmGX4nniPazneQ5VnKdp9H8P4vD+X57nMRofmgBZ4FgIAoBWdoBGAGAeAgfxfjgNZ1DqWxEA0ASAgA==');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '12/2/2017';
		PaneWidth[False] := 256;
		with Bars.Item['Summary'] do
		begin
			Color := $1000000;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%513%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaptionHOffset] := TObject(8);
		end;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			Color := $0;
		end;
	end;
	with Columns do
	begin
		Add('C1');
		Add('C2');
		with (Add('Pos') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 pos ``';
			AllowGroupBy := False;
			Position := 0;
			Width := 48;
			AllowSizing := False;
		end;
	end;
	SortBarVisible := True;
	AllowGroupBy := True;
	BackColorSortBar := BackColor;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Items do
	begin
		CellValue[TObject(AddItem('Item A')),TObject(1)] := 'SubItem A.1';
		CellValue[TObject(AddItem('Item A')),TObject(1)] := 'SubItem A.2';
		CellValue[TObject(AddItem('Item A')),TObject(1)] := 'SubItem A.3';
		CellValue[TObject(AddItem('Item A')),TObject(1)] := 'SubItem A.4';
		CellValue[TObject(AddItem('Item B')),TObject(1)] := 'SubItem B.1';
		CellValue[TObject(AddItem('Item B')),TObject(1)] := 'SubItem B.2';
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
2176
The bar's caption is very difficult to read if any pattern than exPatternSolid is used. Is there any way of displaying the bar's caption (except for displaying the caption outside the bar)

with AxG2antt1 do
begin
	BeginUpdate();
	Font.Size := 12;
	DefaultItemHeight := 24;
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		with Bars.Item['Task'] do
		begin
			Height := 21;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternDiagCross;
		end;
		PaneWidth[False] := 128;
		UnitWidth := 24;
	end;
	with Items do
	begin
		h := AddItem('');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'to do';
		h := AddItem('bgcolor');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<bgcolor=FFFFFF> to do </bgcolor>';
		h := AddItem('fgcolor');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<fgcolor=FFFFFF> to do </fgcolor>';
		h := AddItem('sha');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<sha FFFFFF;2;2> to do </sha>';
		h := AddItem('out');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<out 000000><fgcolor=FFFFFF>to do</fgcolor></out></font>';
		h := AddItem('gra');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<fgcolor FFFFFF><gra 000000;1;1>to do</fgcolor>';
	end;
	EndUpdate();
end
2175
How can I change the position of the bar's tooltip

// ToolTip event - Fired when the control prepares the object's tooltip.
procedure TWinForm1.AxG2antt1_ToolTip(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ToolTipEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'ToolTip' );
		OutputDebugString( e.item );
		OutputDebugString( e.colIndex );
		OutputDebugString( e.visible );
		OutputDebugString( e.x );
		OutputDebugString( e.y );
		OutputDebugString( e.cX );
		OutputDebugString( e.cY );
		e.x := FormatABC('value + 8',TObject(e.x),Nil,Nil);
		e.y := FormatABC('value - 8',TObject(e.y),Nil,Nil);
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := '<b><%=%9 + ''/'' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>';
		LevelCount := 2;
	end;
	with Items do
	begin
		AddBar(AddItem('Tasks A'),'Task','1/2/2001','1/4/2001',Nil,Nil);
		AddBar(AddItem('Tasks B'),'Task','1/3/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
2174
How can I replace the cell's context menu ( while edit mode is running )

// RClick event - Fired when right mouse button is clicked
procedure TWinForm1.AxG2antt1_RClick(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'Edit Mode: ' );
		OutputDebugString( Editing );
		with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.ContextMenu')) as EXCONTEXTMENULib.ExContextMenu) do
		begin
			Items.ToString := 'Check[chk],[sep],Item 1,Item 2,Item 3,Popup(A,B,C)';
			OutputDebugString( Select(Nil,Nil,Nil) );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	with (Columns.Add('Column') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.EditType;
		Option[EXG2ANTTLib.EditorOptionEnum.exEditAllowContextMenu] := TObject(False);
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
	end;
	EndUpdate();
end
2173
Is it possible to highlight the column's header once a filter is applied (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwSA' + 
	'sXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbDM' + 
	'RwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZwX' + 
	'g+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGqD' + 
	'BoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA=');
		Add(2,'gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQFi' + 
	'6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIKA' + 
	'T4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QBH' + 
	'AmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBaB' + 
	'ZhggZgagaYRoEwShWA6NZZAMQBAICA==');
	end;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarActive,$2000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff);
	HeaderHeight := 28;
	BackColorHeader := Color.FromArgb(255,255,255);
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	with Columns do
	begin
		(Add('C1') as EXG2ANTTLib.Column).DisplayFilterButton := True;
		with (Add('C2') as EXG2ANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			Filter := 'Item 2';
			FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter;
		end;
		(Add('C3') as EXG2ANTTLib.Column).DisplayFilterButton := True;
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		CellValue[TObject(h),TObject(1)] := 'Item 2';
		CellValue[TObject(h),TObject(2)] := 'Item 3';
		h := AddItem('Item 4');
		CellValue[TObject(h),TObject(1)] := 'Item 5';
		CellValue[TObject(h),TObject(2)] := 'Item 6';
	end;
	ApplyFilter();
	EndUpdate();
end
2172
How can I make the expand/collapse glyphs DPI aware

with AxG2antt1 do
begin
	size := 2;
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(3,'gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQcC' + 
	'QAI8T5IUgARBJIDSMY6DpOIxYHgmC4DEITNLxOK0EhRHCBZrgOCAYhqEY1Ro+dhPFYjVTMdK0LRtKy7Mq2aJmOpZDxWE7dZKpO5fbxXS67cr2fp/YBed4rfa7KTlOBKc' + 
	'RQRBEFQPDqPZBkORZHh2FoLRJKbgtHJmHYNQWhVyYBbNCyTI6lahpeuHBx1QaWWxjbCMEr6bpoWLbFi3Ha1UzrPa8b5vSw7Gr+HzYQTHGPXGqaYJdZrnea6B7+U5XUJr' + 
	'nSOZciYHwhAeR5HDK+JVGqKRRmScx5HyfRei+H5bmmcp4Fi8o/CGGJKGQKZUGoFQigUPIiCeSZXnyHB6l0SAJn8JxfkIeZ5CgXxjCCAhyB8QgIlAM4MlKAIcCaIBIGYG' + 
	'oGGEYhqBMMxgnICgRDUDQjESGwmAkWBuCqBoiHIVgkDQYgYESWg2E0YhohcJQigITg3CQSRyEyEYGGOWJwhQJD4FiFIMk0aJFGsIBkkOBJeDc+AchYJwJgIWhSgYZQpF' + 
	'IVoVGOGQ4l2EwIBWMhgDmDhThCEwkAiaJchKDhjhgZhsCUY4iFCEoZkiaYQmSGAWhWQhgDuDpTjCDQiEgchAg0IpJBoDoFiEKBqCaCAimgIguH8IZnkPUhcBcJg+hGJZ' + 
	'nloYJsiaKZKGa24YnWSR0CkKhCA2CxlCqColhAYpqEKER0DqVZ0A0ASAgA==');
		Add(4,'gBFLBCJwBAEHhEJAAEhABAQCg6AADACAxRDgMQBQKAAzQFAYbBwHCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACjeQYJBCNYbTJAbqhYI' + 
	'gAR3HqQZABCCSQKkYx0HScRiwPBMFwGIQmaaicZoJCiN4DTZAcIBRDUIxpDR9bBeKw3KqVaZnWhaNpWXZlTzKdSxXisF67RZSdi/XgvF5XXblez9P69LwXe5mUrGbyVY' + 
	'ghCCIKgeG4dR7IMhyLDcKQXCCVW7aGSsOwbAqAXpdGAXTQdDyLJKnaZqOi6BjjA4rNbHGIYJb1XTRMa1LJuG5LJrOeZ3Xre4BLfh1VoFRpjWIYNY1QS7TLOczzfRdDxT' + 
	'iGVpkjCeJoD4Ng1hSRxiisVRKg8D4PkWZJznmPQ+F8Xx5guWpjHGWYMiYQodEaIRSCgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FYF' + 
	'oFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAhaF' + 
	'KFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWRY' + 
	'OiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA==');
		Add(1,AxG2antt1.FormatABC('`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)',TObject(size),Nil,Nil));
		Add(2,AxG2antt1.FormatABC('`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)',TObject(size),Nil,Nil));
	end;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot;
	HasButtons := EXG2ANTTLib.ExpandButtonEnum.exCustom;
	set_HasButtonsCustom(False,16777216);
	set_HasButtonsCustom(True,33554432);
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
2171
Is it possible to highlight the column's header once a filter is applied (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ' + 
	'0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YN' + 
	'YuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4h' + 
	'hKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mgb' + 
	'hOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWB' + 
	'MJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=');
		Add(1,'CP:2 -8 -4 2 4');
	end;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$1fefefe);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarActive,$1010101);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff);
	HeaderHeight := 28;
	BackColorHeader := Color.FromArgb(255,255,255);
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	with Columns do
	begin
		(Add('C1') as EXG2ANTTLib.Column).DisplayFilterButton := True;
		with (Add('C2') as EXG2ANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			Filter := 'Item 2';
			FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter;
		end;
		(Add('C3') as EXG2ANTTLib.Column).DisplayFilterButton := True;
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		CellValue[TObject(h),TObject(1)] := 'Item 2';
		CellValue[TObject(h),TObject(2)] := 'Item 3';
		h := AddItem('Item 4');
		CellValue[TObject(h),TObject(1)] := 'Item 5';
		CellValue[TObject(h),TObject(2)] := 'Item 6';
	end;
	ApplyFilter();
	EndUpdate();
end
2170
How do I update itemcount and matchitemcount of the FilterBarCaption after I added the item using the AddItem method
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TWinForm1.AxG2antt1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Items.AddItem('new');
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('Item') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc);
	end;
	with (Columns.Add('Pos') as EXG2ANTTLib.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarCaption := '`<r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1)' + 
	' + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )';
	FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseOnRight) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible);
	EndUpdate();
end
2169
The Edit method does not work while ReadOnly property is exLocked and the first column is hidden. Is there any fix

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TWinForm1.AxG2antt1_DblClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_DblClickEvent);
begin
	with AxG2antt1 do
	begin
		var_ItemFromPoint := get_ItemFromPoint(-1,-1,c,hit);
		FocusColumnIndex := c;
		Edit(Nil);
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	AutoEdit := False;
	ReadOnly := EXG2ANTTLib.ReadOnlyEnum.exLocked;
	AutoSearch := True;
	(Columns.Add('') as EXG2ANTTLib.Column).Visible := False;
	with (Columns.Add('Contains') as EXG2ANTTLib.Column) do
	begin
		AutoSearch := EXG2ANTTLib.AutoSearchEnum.exContains;
		Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType;
	end;
	with Items do
	begin
		CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Tom Hanks';
		CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Leonardo DiCaprio';
		CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Will Smith';
		CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Tom Cruise';
	end;
	EndUpdate();
end
2168
How can I highlight the cell's button with a different appearance, when cursor hovers it

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	DefaultItemHeight := 22;
	TreeColumnIndex := -1;
	SelForeColor := Color.FromArgb(0,0,0);
	SelBackColor := BackColor;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverCellButton,$1000000);
	with (Columns.Add('Buttons') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
		HeaderAlignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
	end;
	with Items do
	begin
		AddItem('Button <b>1</b>');
		AddItem('Button <b>2</b>');
		AddItem('Button <b>3</b>');
	end;
	EndUpdate();
end
2167
How to group one or more operations into a block when the user do undo or redo

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowUndoRedo := True;
		FirstVisibleDate := '6/20/2005';
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
	end;
	with Items do
	begin
		StartBlockUndoRedo();
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Nil);
		AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Nil);
		AddLink('L1',ItemByIndex[0],'',ItemByIndex[1],'');
		EndBlockUndoRedo();
		h := ItemByIndex[1];
	end;
	with Chart.Notes.Add('NoteD',TObject(h),'6/26/2005','CTRL+Z (undo), CTRL+Y (redo)') do
	begin
		PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
		PartToolTip[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 'Press CTRL+Z to undo <br> and then press CTRL+Y to redo';
		PartTransparency[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 25;
		PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -2;
		PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteEnd] := $ffff;
	end;
	EndUpdate();
end
2166
I am using the Link property to customize the link, but when I press redo it (CTRL+Y) to redo it, not all properties are restored. What can be done

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowUndoRedo := True;
		FirstVisibleDate := '6/20/2005';
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','6/23/2005','7/1/2005','',Nil);
		AddBar(AddItem('Task 2'),'Task','6/27/2005','7/4/2005','',Nil);
		StartBlockUndoRedo();
		AddLink('L1',ItemByIndex[0],'',ItemByIndex[1],'');
		u := StartUpdateLink['L1'];
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkWidth] := TObject(2);
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := '<fgcolor FF0000>CTRL+Z (undo), CTRL+Y (redo)';
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkToolTip] := 'Press CTRL+Z to undo <br> and then press CTRL+Y to redo';
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(0);
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkColor] := TObject(255);
		EndUpdateLink(u);
		EndBlockUndoRedo();
	end;
	EndUpdate();
end
2165
I am using the ItemBar property to customize the task, but when I press redo it (CTRL+Y) to redo it, not all properties are restored. What can be done

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowUndoRedo := True;
		FirstVisibleDate := '6/20/2005';
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 64;
		Bars.Item['Task'].Height := 16;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','6/21/2005','6/30/2005','',Nil);
		h := AddItem('Task 2');
		StartBlockUndoRedo();
		AddBar(h,'Task','6/27/2005','7/4/2005','','CTRL+Z (undo), CTRL+Y (redo)');
		u := StartUpdateBar[h,''];
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'Press CTRL+Z to undo <br> and then press CTRL+Y to redo';
		EndUpdateBar(u);
		EndBlockUndoRedo();
	end;
	EndUpdate();
end
2164
The incremental search feature is no working for columns with editor assigned. What can be done

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TWinForm1.AxG2antt1_DblClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_DblClickEvent);
begin
	with AxG2antt1 do
	begin
		Edit(Nil);
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	AutoEdit := False;
	AutoSearch := True;
	with (Columns.Add('Contains') as EXG2ANTTLib.Column) do
	begin
		AutoSearch := EXG2ANTTLib.AutoSearchEnum.exContains;
		Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType;
	end;
	with Items do
	begin
		AddItem('Tom Hanks');
		AddItem('Leonardo DiCaprio');
		AddItem('Will Smith');
		AddItem('Tom Cruise');
	end;
	EndUpdate();
end
2163
Each item is representated by a key as string. Is it possible to have a drop down editor to display more information when using the item's key

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with (Columns.Add('Multiple-Columns Tree DropDownListType') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType;
		AddItem(0,'KR|Korea, Republic of',Nil);
		AddItem(1,'MO|Macao',Nil);
		AddItem(2,'SA|Saudi Arabia',Nil);
		AddItem(3,'EG|Egypt',Nil);
		AddItem(4,'GB|United Kingdom',Nil);
		AddItem(5,'GT|Guatemala',Nil);
		AddItem(6,'SR|Suriname',Nil);
		AddItem(7,'BM|Bermuda',Nil);
	end;
	with Items do
	begin
		AddItem('EG');
		AddItem('GB');
		AddItem('BM');
	end;
	EndUpdate();
end
2162
My table includes codes/keys for items, can I display a drop down editor to include more information

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with (Columns.Add('Multiple-Columns DropDownListType') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType;
		DropDownAutoWidth := EXG2ANTTLib.DropDownWidthType.exDropDownEditorWidth;
		Option[EXG2ANTTLib.EditorOptionEnum.exDropDownColumnCaption] := 'City¦Coordinates¦State';
		AddItem(0,'JV3|Jollyville¦3026N 09746W¦Texas',Nil);
		AddItem(1,'TMO|Altamont¦4021N 11017W¦Utah',Nil);
		AddItem(2,'IIM|Williamston¦4241N 08417W¦Michigan',Nil);
		AddItem(3,'IWN|Merrittstown¦3958N 07952W¦Pennsylvania',Nil);
		AddItem(4,'HOU|Houston¦2945N 09521W¦Texas',Nil);
		AddItem(5,'GSF|Gales Ferry¦4125N 07205W¦Connecticut',Nil);
	end;
	with Items do
	begin
		AddItem('HOU');
		AddItem('IIM');
		AddItem('TMO');
	end;
	EndUpdate();
end
2161
How can I display and select from a multiple-columns tree editor

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with (Columns.Add('Multiple-Columns Tree DropDownListType') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType;
		DropDownAutoWidth := EXG2ANTTLib.DropDownWidthType.exDropDownEditorWidth;
		Option[EXG2ANTTLib.EditorOptionEnum.exDropDownColumnCaption] := 'Name¦Title¦City¦Phone';
		Option[EXG2ANTTLib.EditorOptionEnum.exDropDownColumnWidth] := '224¦¦¦96';
		AddItem(1,'Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857',TObject(1));
		AddItem(2,'Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482',TObject(2));
		InsertItem(3,'Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412',TObject(3),TObject(2));
		InsertItem(4,'Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122',TObject(3),TObject(2));
		InsertItem(5,'Steven Buchanan¦Sales Manager¦London¦(71) 555-4848',TObject(2),TObject(2));
		InsertItem(6,'Michael Suyama¦Sales Representative¦London¦(71) 555-7773',TObject(1),TObject(5));
		InsertItem(7,'Robert King¦Sales Representative¦Kirkland¦(71) 555-5598',TObject(2),TObject(2));
		InsertItem(8,'Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189',TObject(3),TObject(2));
		InsertItem(9,'Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444',TObject(2),TObject(5));
		ExpandAll();
	end;
	with Items do
	begin
		AddItem(TObject(1));
		AddItem(TObject(2));
		AddItem(TObject(4));
	end;
	EndUpdate();
end
2160
Does you control support multiple-columns for a drop down editor

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with (Columns.Add('Multiple-Columns DropDownListType') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType;
		DropDownAutoWidth := EXG2ANTTLib.DropDownWidthType.exDropDownEditorWidth;
		AddItem(0,'Jollyville¦JV3¦3026N 09746W¦TX',Nil);
		AddItem(1,'Altamont¦TMO¦4021N 11017W¦UT',Nil);
		AddItem(2,'Williamston¦IIM¦4241N 08417W¦MI',Nil);
		AddItem(3,'Merrittstown¦IWN¦3958N 07952W¦PA',Nil);
		AddItem(4,'Houston¦HOU¦2945N 09521W¦TX',Nil);
		AddItem(5,'Gales Ferry¦GSF¦4125N 07205W¦CT',Nil);
	end;
	with Items do
	begin
		InsertItem(0,'',TObject(1));
		InsertItem(0,'',TObject(2));
		InsertItem(0,'',TObject(4));
	end;
	EndUpdate();
end
2159
Is it possible to change the summary-bar's start or/and end margins

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	ColumnAutoResize := False;
	with Chart do
	begin
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		AllowLinkBars := False;
		FirstVisibleDate := '1/1/2008';
		LevelCount := 2;
		PaneWidth[False] := 256;
	end;
	(Columns.Add('Members') as EXG2ANTTLib.Column).Width := 96;
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Width := 112;
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		LevelKey := TObject(1);
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Width := 112;
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		LevelKey := TObject(1);
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		hR1 := AddItem('Team');
		AddBar(hR1,'Summary','1/2/2008','1/8/2008','',Nil);
		AddBar(hR1,'','1/13/2008','1/13/2008','R',Nil);
		ItemBar[hR1,'R',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(100);
		DefineSummaryBars(hR1,'',h1,'R');
		h1 := InsertItem(hR1,Nil,'Member 1');
		AddBar(h1,'Task','1/2/2008','1/7/2008',Nil,Nil);
		DefineSummaryBars(hR1,'',h1,'');
		h1 := InsertItem(hR1,Nil,'Member 2');
		AddBar(h1,'Task','1/4/2008','1/9/2008',Nil,Nil);
		DefineSummaryBars(hR1,'',h1,'');
		h1 := InsertItem(hR1,Nil,'Member 3');
		AddBar(h1,'Task','1/5/2008','1/10/2008',Nil,Nil);
		DefineSummaryBars(hR1,'',h1,'');
		ExpandItem[hR1] := True;
	end;
	EndUpdate();
end
2158
I want to display two lines/curves in the histogram-area such as expected and actual work effor per month. How can I do that (leaf)

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '10/5/2020';
		HistogramVisible := True;
		HistogramHeight := 96;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramRecLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib.PatternEnum.exRectangularCurve;
			HistogramItems := -4;
			HistogramBorderSize := 1;
		end;
		with Bars.Copy('Task','C') do
		begin
			HistogramPattern := EXG2ANTTLib.PatternEnum.exRectangularCurve;
			HistogramItems := -4;
			HistogramColor := $ff;
			HistogramBorderSize := 2;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project A');
		AddBar(InsertItem(h,Nil,'Item 1'),'Task','10/7/2020','10/14/2020',Nil,Nil);
		AddBar(InsertItem(h,Nil,'Item 2'),'Task','10/10/2020','10/17/2020',Nil,Nil);
		ExpandItem[h] := True;
		h := AddItem('Project B');
		AddBar(InsertItem(h,Nil,'Item 1'),'C','10/13/2020','10/20/2020',Nil,Nil);
		AddBar(InsertItem(h,Nil,'Item 2'),'C','10/15/2020','10/23/2020',Nil,Nil);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2157
I want to display two lines/curves in the histogram-area such as expected and actual work effor per month. How can I do that (flat)

// BarResize event - Occurs when a bar is moved or resized.
procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemBar[e.item,TObject(e.key),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := ItemBar[e.item,TObject(e.key),EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent];
			ItemBar[e.item,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(1);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Chart do
	begin
		FirstVisibleDate := '10/5/2020';
		PaneWidth[False] := 128;
		LevelCount := 2;
		HistogramHeight := 96;
		HistogramVisible := True;
		with Bars.Add('Task%Progress') do
		begin
			HistogramPattern := EXG2ANTTLib.PatternEnum.exRectangularCurve;
			HistogramItems := -4;
			HistogramBorderSize := 1;
			HistogramBorderColor := Color;
			Shortcut := 'P';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
		end;
		with Bars.Copy('Task','C') do
		begin
			HistogramPattern := EXG2ANTTLib.PatternEnum.exRectangularCurve;
			HistogramColor := $ff;
			HistogramBorderSize := 2;
		end;
	end;
	(Columns.Add('Tasks') as EXG2ANTTLib.Column).FormatColumn := '`Task ` + (1 index ``)';
	with Items do
	begin
		h := AddItem(Nil);
		AddBar(h,'P','10/7/2020','10/14/2020','P',Nil);
		ItemBar[h,'P',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.5);
		AddBar(h,'C','10/7/2020','10/14/2020','C',Nil);
		ItemBar[h,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(100);
		GroupBars(h,'P',True,h,'C',True,Nil,Nil);
		GroupBars(h,'P',False,h,'C',False,Nil,Nil);
		h := AddItem(Nil);
		AddBar(h,'P','10/10/2020','10/17/2020','P',Nil);
		ItemBar[h,'P',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.75);
		AddBar(h,'C','10/10/2020','10/17/2020','C',Nil);
		ItemBar[h,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(100);
		GroupBars(h,'P',True,h,'C',True,Nil,Nil);
		GroupBars(h,'P',False,h,'C',False,Nil,Nil);
		h := AddItem(Nil);
		AddBar(h,'P','10/13/2020','10/20/2020','P',Nil);
		ItemBar[h,'P',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.25);
		AddBar(h,'C','10/13/2020','10/20/2020','C',Nil);
		ItemBar[h,'C',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(100);
		GroupBars(h,'P',True,h,'C',True,Nil,Nil);
		GroupBars(h,'P',False,h,'C',False,Nil,Nil);
	end;
	EndUpdate();
end
2156
Is it possible to show the filterbar on top of the rows

with AxG2antt1 do
begin
	BeginUpdate();
	FilterBarPromptVisible := EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarTop;
	HeaderHeight := 24;
	FilterBarHeight := HeaderHeight;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric;
	with (Columns.Add('Column') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern;
		Filter := 'B*';
	end;
	with (Columns.Add('Index') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '1 index ``';
		Position := 0;
		Width := 48;
		AllowSizing := False;
		SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
	end;
	with Items do
	begin
		AddItem('A.1');
		AddItem('A.2');
		AddItem('B.1');
		AddItem('B.2');
		AddItem('B.3');
		AddItem('C');
	end;
	ApplyFilter();
	EndUpdate();
end
2155
The deadline symbol is now a white arrow and it is difficult to see. I want to create a green or black arrow for showing deadline

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 96;
		with Bars.Item['Deadline'] do
		begin
			StartColor := $8000;
			StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconDown3;
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task'),'Deadline','1/2/2001','1/2/2001',Nil,Nil);
	end;
	EndUpdate();
end
2154
DragDrop (with visual effect)

// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
procedure TWinForm1.AxG2antt1_OLEDragDrop(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEDragDropEvent);
begin
	// SelectItem(InsertItem(i,, Data.GetData(1))) = True
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		with Items do
		begin
			ExpandItem[i] := True;
		end;
	end
end;

// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TWinForm1.AxG2antt1_OLEStartDrag(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEvent);
begin
	// Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	with AxG2antt1 do
	begin
		e.allowedEffects := 1;
	end
end;

with AxG2antt1 do
begin
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJGj' + 
	'uKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA==');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exListOLEDropPosition,$1000000);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exChartOLEDropPosition,$1);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exDragDropBefore,$0);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exDragDropAfter,$ffffff);
	OLEDropMode := EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAnyOnRight;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Indent := 16;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	OutputDebugString( 'You can:' );
	OutputDebugString( 'A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)' );
	OutputDebugString( 'B) right-click to re-arrange the item position inside the same control' );
	OutputDebugString( 'This sample shows how you can insert the data being dropped as a child of the item being hovered.' );
end
2153
DragDrop (with no visual effect, hide item while drag and drop)

// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
procedure TWinForm1.AxG2antt1_OLEDragDrop(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEDragDropEvent);
begin
	// SelectItem(InsertItem(i,, Data.GetData(1))) = True
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		with Items do
		begin
			ExpandItem[i] := True;
		end;
	end
end;

// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TWinForm1.AxG2antt1_OLEStartDrag(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEvent);
begin
	// Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	with AxG2antt1 do
	begin
		e.allowedEffects := 1;
	end
end;

with AxG2antt1 do
begin
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exDragDropBefore,$0);
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exDragDropAfter,$ffffff);
	OLEDropMode := EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAnyOnRight;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Indent := 16;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	OutputDebugString( 'You can:' );
	OutputDebugString( 'A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)' );
	OutputDebugString( 'B) right-click to re-arrange the item position inside the same control' );
	OutputDebugString( 'This sample shows how you can insert the data being dropped as a child of the item being hovered.' );
end
2152
DragDrop

// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
procedure TWinForm1.AxG2antt1_OLEDragDrop(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEDragDropEvent);
begin
	// SelectItem(InsertItem(i,, Data.GetData(1))) = True
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		with Items do
		begin
			ExpandItem[i] := True;
		end;
	end
end;

// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TWinForm1.AxG2antt1_OLEStartDrag(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEvent);
begin
	// Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	with AxG2antt1 do
	begin
		e.allowedEffects := 1;
	end
end;

with AxG2antt1 do
begin
	OLEDropMode := EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAnyOnRight;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Indent := 16;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	OutputDebugString( 'You can:' );
	OutputDebugString( 'A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)' );
	OutputDebugString( 'B) right-click to re-arrange the item position inside the same control' );
	OutputDebugString( 'This sample shows how you can insert the data being dropped as a child of the item being hovered.' );
end
2151
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Columns do
	begin
		Add('Item');
		with (Add('Pos') as EXG2ANTTLib.Column) do
		begin
			Position := 0;
			Width := 32;
			AllowSizing := False;
			FormatColumn := '1 index ``';
			AllowSort := False;
			AllowDragging := False;
		end;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	EndUpdate();
end
2150
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff);
	with Columns do
	begin
		Add('Item');
		with (Add('Pos') as EXG2ANTTLib.Column) do
		begin
			Position := 0;
			Width := 32;
			AllowSizing := False;
			FormatColumn := '1 index ``';
			AllowSort := False;
			AllowDragging := False;
		end;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	EndUpdate();
end
2149
How can I detect the last visible item
// SelectionChanged event - Fired after a new item has been selected.
procedure TWinForm1.AxG2antt1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( NextVisibleItem[FocusItem] );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny;
	Columns.Add('Column');
	with Items do
	begin
		InsertItem(AddItem('Item 1'),Nil,'Child 1');
		AddItem('Item 2');
		AddItem('Item 3');
		InsertItem(AddItem('Item 4'),Nil,'Child 4');
		AddItem('Item 5');
	end;
	EndUpdate();
end
2148
Is it possible to show the non-working part on the back (behind the item's background)

// CellStateChanged event - Fired after cell's state has been changed.
procedure TWinForm1.AxG2antt1_CellStateChanged(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	DefaultItemHeight := 22;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with VisualAppearance do
	begin
		Add(2,'gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEcx' + 
	'9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJcF' + 
	'qXFSLVxNBKAQEBA=');
		Add(4,'gBFLBCJwBAEHhEJAAEhABTcIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEiJYgGIZxYh8MQER5IEbyBDsBw5AaZZojGRJGi' + 
	'gNIqSxLUhTRKUdQrG4AKQnGhpDgmJYnU5EcrSUKQcw/JaiKYpGZYXpqO5OTzUIyVHDdKgFGKNKwjKiKKp6FofDJcADUcKAYBKFoaLjgS5bXhSGpnV5bFoWdLTVwhBKAQ' + 
	'EBA=');
		Add(1,'CP:2 1 1 -1 -1');
		Add(3,'CP:4 1 1 -1 -1');
	end;
	with ConditionalFormats.Add('%CS0 = 1',Nil) do
	begin
		BackColor := $3000000;
		ChartBackColor := BackColor;
	end;
	with Chart do
	begin
		FirstVisibleDate := '8/1/2017';
		LevelCount := 2;
		PaneWidth[False] := 128;
		Bars.Item['Task'].Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
		with Bars.Item['Summary'] do
		begin
			StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty;
			EndShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty;
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown;
		end;
		SelBackColor := AxG2antt1.SelBackColor;
		SelBarColor := $808080;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		NonworkingDaysPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
		GridLineStyle := Integer(EXG2ANTTLib.GridLinesStyleEnum.exGridLinesBehind) Or Integer(EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid);
	end;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Nil,'Task 1');
		AddBar(hChild,'Task','8/2/2017','8/8/2017',Nil,Nil);
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Nil,'Task 2');
		AddBar(hChild,'Task','8/3/2017','8/10/2017',Nil,Nil);
		hChild := InsertItem(h,Nil,'Task 3');
		AddBar(hChild,'Task','8/4/2017','8/12/2017',Nil,Nil);
		CellState[TObject(hChild),TObject(0)] := 1;
		hChild := InsertItem(h,Nil,'Task 4');
		AddBar(hChild,'Task','8/5/2017','8/14/2017',Nil,Nil);
		hChild := InsertItem(h,Nil,'Task 5');
		AddBar(hChild,'Task','8/6/2017','8/16/2017',Nil,Nil);
		AddBar(h,'Summary','8/1/2017','8/1/2017','sum',Nil);
		DefineSummaryBars(h,'sum',-3,'');
		ExpandItem[h] := True;
		h := AddItem('ItemBackColor');
		AddBar(h,'Progress','8/4/2017','8/14/2017',Nil,Nil);
		ItemBackColor[h] := $18080ff;
		AxG2antt1.Chart.ItemBackColor[h] := $18080ff;
	end;
	EndUpdate();
end
2147
How can I hide a bar within the control's overview (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$bebebe);
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		OverviewHeight := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		FirstVisibleDate := '1/1/2020';
		Bars.Copy('Task','TaskO').Color := $ff;
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('');
		AddBar(h,'Task','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'Task','12/2/2020','12/12/2020','K2',Nil);
		h := AddItem('');
		AddBar(h,'TaskO','1/2/2020','1/12/2020','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarOverviewColor] := TObject(-1);
		AddBar(h,'TaskO','12/2/2020','12/12/2020','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarOverviewColor] := TObject(-1);
		h := AddItem('');
		AddBar(h,'Task','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'Task','12/2/2020','12/12/2020','K2',Nil);
	end;
	EndUpdate();
end
2146
How can I hide all bars within the control's overview (sample 2)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$bebebe);
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		OverviewHeight := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewHideBars) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowOnlyVisible);
		FirstVisibleDate := '1/1/2020';
		with Bars.Copy('Task','TaskO') do
		begin
			OverviewColor := $ffffffff;
			Color := $ff;
		end;
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('');
		AddBar(h,'Task','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'Task','12/2/2020','12/12/2020','K2',Nil);
		h := AddItem('');
		AddBar(h,'TaskO','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'TaskO','12/2/2020','12/12/2020','K2',Nil);
		h := AddItem('');
		AddBar(h,'Task','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'Task','12/2/2020','12/12/2020','K2',Nil);
	end;
	EndUpdate();
end
2145
How can I hide all bars or specified type within the control's overview (sample 3)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,$bebebe);
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 64;
		OverviewHeight := 48;
		OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewSplitter) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible);
		FirstVisibleDate := '1/1/2020';
		with Bars.Copy('Task','TaskO') do
		begin
			OverviewColor := $ffffffff;
			Color := $ff;
		end;
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('');
		AddBar(h,'Task','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'Task','12/2/2020','12/12/2020','K2',Nil);
		h := AddItem('');
		AddBar(h,'TaskO','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'TaskO','12/2/2020','12/12/2020','K2',Nil);
		h := AddItem('');
		AddBar(h,'Task','1/2/2020','1/12/2020','K1',Nil);
		AddBar(h,'Task','12/2/2020','12/12/2020','K2',Nil);
	end;
	EndUpdate();
end
2144
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		Items.AddBar(e.item,'Task','1/2/2001','1/9/2001',Nil,Nil);
	end
end;

// FilterChange event - Occurs when the filter was changed.
procedure TWinForm1.AxG2antt1_FilterChange(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Indent := AxG2antt1.FormatABC('value > 0 ? 18 : 0',Items.MatchItemCount,Nil,Nil);
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Indent := 18;
	FilterInclude := EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 164;
	end;
	with Columns do
	begin
		with (Add('Column') as EXG2ANTTLib.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter;
			FilterList := EXG2ANTTLib.FilterListEnum.exShowCheckBox;
			Filter := 'C1';
		end;
		with (Add('Pos') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 rindex ``';
			Position := 0;
			AllowSizing := False;
			AllowDragging := False;
		end;
	end;
	with Items do
	begin
		h := AddItem('R1');
		h2 := InsertItem(h,Nil,'S');
		InsertItem(h2,Nil,'C1');
		InsertItem(h2,Nil,'C2');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Nil,'C1');
		InsertItem(h,Nil,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
2143
I am using the Chart.AllowResizeChart property. How can I customize the labels into the chart's levels
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		AllowResizeChart := Integer(EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader);
		Label[EXG2ANTTLib.UnitEnum.exYear] := 'year';
		Label[EXG2ANTTLib.UnitEnum.exHalfYear] := '';
		Label[EXG2ANTTLib.UnitEnum.exQuarterYear] := '';
		Label[EXG2ANTTLib.UnitEnum.exMonth] := 'month';
		Label[EXG2ANTTLib.UnitEnum.exThirdMonth] := '';
		Label[EXG2ANTTLib.UnitEnum.exWeek] := 'week';
		Label[EXG2ANTTLib.UnitEnum.exDay] := 'day';
		Label[EXG2ANTTLib.UnitEnum.exHour] := 'hour';
		Label[EXG2ANTTLib.UnitEnum.exMinute] := '';
		Label[EXG2ANTTLib.UnitEnum.exSecond] := '';
		ShowNonworkingDates := False;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		UnitWidth := 32;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A'),'Task','1/2/2001','1/6/2001','K1',Nil);
		AddBar(AddItem('Task B'),'Task','1/6/2001','1/10/2001','K1',Nil);
		AddBar(AddItem('Task C'),'Task','1/10/2001','1/14/2001','K1',Nil);
		AddBar(AddItem(''),'','1/8/2001','1/8/2001','Info','Click the <b>middle</b> mouse button and start dragging');
	end;
	EndUpdate();
end
2142
Is it possible to display the header using multiple lines, while chart display multiple levels (sample 2)

// AddColumn event - Fired after a new column has been added.
procedure TWinForm1.AxG2antt1_AddColumn(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddColumnEvent);
begin
	// Column.Def(52) = 4
	// Column.Def(53) = 4
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[True] := 256;
	end;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	with Columns do
	begin
		Add('Column');
		(Add('C1') as EXG2ANTTLib.Column).HTMLCaption := '<b>C<off 4>1</b><br>left';
		(Add('C2') as EXG2ANTTLib.Column).HTMLCaption := '<c><b>C<off 4>2</b><br><c>center';
		(Add('C3') as EXG2ANTTLib.Column).HTMLCaption := '<r><b>C<off 4>3</b><br><r>right';
	end;
	EndUpdate();
end
2141
Is there any way to control the z-order of a TimeZone

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		UnitWidth := 15;
		LevelCount := 2;
		FirstVisibleDate := '12/28/2009';
		MarkTimeZone('Top','1/1/2010','1/5/2010',TObject(16711680),'1;;<fgcolor=FFFFFF>Top;1');
		MarkTimeZone('Partial','1/8/2010','1/12/2010',TObject(16711680),'50;;<fgcolor=FFFFFF>Partial;1');
		MarkTimeZone('Default','1/15/2010','1/19/2010',TObject(16711680),';;<fgcolor=FFFFFF>Default;1');
	end;
end
2140
Is it possible to display the header using multiple lines, while chart display multiple levels (sample 1)

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.LevelCount := 2;
	HeaderHeight := 18;
	HeaderSingleLine := False;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	(Columns.Add('This is just a column that should break the header.') as EXG2ANTTLib.Column).Width := 32;
	Columns.Add('This is just another column that should break the header.');
	EndUpdate();
end
2139
Difference between HistogramValueFromPoint and HistogramValue (sample 2)

// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			v1 := HistogramValueFromPoint[-1,-1];
			v2 := HistogramValue[TObject(DateFromPoint[-1,-1]),Nil,Nil];
			vMin := HistogramValue['min',Nil,Nil];
			vMax := HistogramValue['max',Nil,Nil];
		end;
		format := FormatABC('`<b>ValueFromPoint</b>: ` + A + `<br>ValueFromDate: ` + B',TObject(v1),TObject(v2),Nil);
		format := FormatABC('A  + `<br>Min: ` + B + `<br>Max: ` + C',TObject(format),TObject(vMin),TObject(vMax));
		ShowToolTip(format,Nil,Nil,'16','16');
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		LevelCount := 2;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/9/2005';
		HistogramVisible := True;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramGroupCumulative) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems);
		HistogramHeight := 128;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
			HistogramItems := -6;
			HistogramRulerLinesColor := $10000;
			HistogramBorderSize := 1;
			HistogramBorderColor := $10000;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor;
			HistogramCumulativeShowLegend := -1;
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task'),'Task','6/10/2005','6/14/2005','',Nil);
		AddBar(AddItem('Task'),'Task','6/11/2005','6/15/2005','',Nil);
		AddBar(AddItem('Task'),'Task','6/12/2005','6/16/2005','',Nil);
	end;
	EndUpdate();
end
2138
Difference between HistogramValueFromPoint and HistogramValue (sample 1)

// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			v1 := HistogramValueFromPoint[-1,-1];
			v2 := HistogramValue[TObject(DateFromPoint[-1,-1]),Nil,Nil];
			vMin := HistogramValue['min',Nil,Nil];
			vMax := HistogramValue['max',Nil,Nil];
		end;
		format := FormatABC('`<b>ValueFromPoint</b>: ` + A + `<br>ValueFromDate: ` + B',TObject(v1),TObject(v2),Nil);
		format := FormatABC('A  + `<br>Min: ` + B + `<br>Max: ` + C',TObject(format),TObject(vMin),TObject(vMax));
		ShowToolTip(format,Nil,Nil,'16','16');
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		LevelCount := 2;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/9/2005';
		HistogramVisible := True;
		HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
		HistogramHeight := 128;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverload;
			HistogramItems := -6;
			HistogramRulerLinesColor := $10000;
			HistogramBorderSize := 1;
			HistogramBorderColor := $10000;
		end;
	end;
	with Items do
	begin
		AddBar(AddItem('Task'),'Task','6/10/2005','6/14/2005','',Nil);
		AddBar(AddItem('Task'),'Task','6/11/2005','6/15/2005','',Nil);
		AddBar(AddItem('Task'),'Task','6/12/2005','6/16/2005','',Nil);
	end;
	EndUpdate();
end
2137
I am using the Inside-Zoom feature, but the inside grid lines are more dashed the dotted

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		with DefaultInsideZoomFormat do
		begin
			InsideLabel := '<%hh%>';
			InsideUnit := EXG2ANTTLib.UnitEnum.exHour;
			InsideCount := 8;
			GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric;
		end;
		AllowInsideZoom := True;
		with InsideZooms do
		begin
			Add('1/4/2008');
		end;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
		ShowNonworkingDates := False;
	end;
	EndUpdate();
end
2136
I am using expressions for exBarEffort, but the histogram does not show correctly the data

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Chart do
	begin
		FirstVisibleDate := '10/5/2020';
		PaneWidth[False] := 128;
		LevelCount := 2;
		HistogramHeight := 96;
		HistogramVisible := True;
		AllowInsideZoom := True;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		with InsideZooms.Add('10/7/2020') do
		begin
			Width := 196;
		end;
		DefaultInsideZoomFormat.GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := '(hour(value) > 5 and hour(value) < 18) ? 2 : 0';
		end;
		HistogramUnitScale := EXG2ANTTLib.UnitEnum.exHour;
	end;
	(Columns.Add('Tasks') as EXG2ANTTLib.Column).FormatColumn := '`Task ` + (1 index ``)';
	with Items do
	begin
		AddBar(AddItem(''),'Task','10/7/2020','10/12/2020',Nil,Nil);
		AddBar(AddItem(''),'Task','10/8/2020','10/13/2020',Nil,Nil);
	end;
	EndUpdate();
end
2135
How can I specify the z-order of bars to be shown within the chart's histogram

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Chart do
	begin
		FirstVisibleDate := '10/5/2020';
		PaneWidth[False] := 128;
		LevelCount := 2;
		HistogramHeight := 96;
		HistogramVisible := True;
		with Bars.Add('A') do
		begin
			Color := $ff0000;
			HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
			HistogramItems := -6;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
		with Bars.Copy('A','B') do
		begin
			Color := $ff00;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramGroupCumulative) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems);
		HistogramZOrder := 'A,B';
	end;
	(Columns.Add('Tasks') as EXG2ANTTLib.Column).FormatColumn := '`Task ` + (1 index ``)';
	with Items do
	begin
		AddBar(AddItem(''),'A','10/7/2020','10/12/2020',Nil,Nil);
		AddBar(AddItem(''),'A','10/8/2020','10/13/2020',Nil,Nil);
		AddBar(AddItem(''),'B','10/9/2020','10/14/2020',Nil,Nil);
		AddBar(AddItem(''),'B','10/10/2020','10/15/2020',Nil,Nil);
	end;
	EndUpdate();
end
2134
How can I show cumulative histogram for two or more different types of bars

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Chart do
	begin
		FirstVisibleDate := '10/5/2020';
		PaneWidth[False] := 128;
		LevelCount := 2;
		HistogramHeight := 96;
		HistogramVisible := True;
		with Bars.Add('A') do
		begin
			Color := $ff0000;
			HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
			HistogramItems := -6;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
		with Bars.Copy('A','B') do
		begin
			Color := $ff00;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
		HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramGroupCumulative) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems);
	end;
	(Columns.Add('Tasks') as EXG2ANTTLib.Column).FormatColumn := '`Task ` + (1 index ``)';
	with Items do
	begin
		AddBar(AddItem(''),'A','10/7/2020','10/12/2020',Nil,Nil);
		AddBar(AddItem(''),'A','10/8/2020','10/13/2020',Nil,Nil);
		AddBar(AddItem(''),'B','10/9/2020','10/14/2020',Nil,Nil);
		AddBar(AddItem(''),'B','10/10/2020','10/15/2020',Nil,Nil);
	end;
	EndUpdate();
end
2133
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric;
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJXh' + 
	'aI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA==');
	with (Columns.Add('Default') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '((1 rindex ``) contains `.`) = 0';
		Visible := False;
	end;
	with ConditionalFormats.Add('%C1',Nil) do
	begin
		BackColor := $1e0e0e0;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'Child 3');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		h := AddItem('Root 3');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
	end;
	EndUpdate();
end
2132
I can not center or align the cell's caption and icon, when it displays the hierarchy

with AxG2antt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
	end;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Nil,'<img>1</img> Task (left)');
		hChild := InsertItem(h,Nil,'<c><img>2</img> Task (center)');
		hChild := InsertItem(h,Nil,'<r>Task (right) <img>3</img>');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2131
How do I mask for float/integer number

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	(Columns.Add('Type') as EXG2ANTTLib.Column).Width := 32;
	Columns.Add('Editor');
	with Items do
	begin
		h := AddItem('Integer');
		CellValue[TObject(h),TObject(1)] := '12';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.EditType;
			Numeric := EXG2ANTTLib.NumericEnum.exInteger;
		end;
		h := AddItem('Integer (mask, group)');
		CellValue[TObject(h),TObject(1)] := '10002';
		FormatCell[TObject(h),TObject(1)] := 'value format `0||`';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.MaskType;
			Mask := ';;;float,digits=0,invalid=empty,warning=invalid character';
		end;
		h := AddItem('Integer (mask, no group)');
		CellValue[TObject(h),TObject(1)] := '10002';
		FormatCell[TObject(h),TObject(1)] := 'value format `0|0|`';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.MaskType;
			Mask := ';;;float,digits=0,grouping=,invalid=empty,warning=invalid character';
		end;
		h := AddItem('Float');
		CellValue[TObject(h),TObject(1)] := '+12.34E+2';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.EditType;
			Numeric := EXG2ANTTLib.NumericEnum.exFloat;
		end;
		h := AddItem('Float (no signs)');
		CellValue[TObject(h),TObject(1)] := '12.34E-2';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.EditType;
			Numeric := Integer(EXG2ANTTLib.NumericEnum.exDisableSigns) Or Integer(EXG2ANTTLib.NumericEnum.exFloat);
		end;
		h := AddItem('Float-Integer');
		CellValue[TObject(h),TObject(1)] := '+12.34';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.EditType;
			Numeric := EXG2ANTTLib.NumericEnum.exFloatInteger;
		end;
		h := AddItem('Float-Integer (no signs)');
		CellValue[TObject(h),TObject(1)] := '12.34';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.EditType;
			Numeric := Integer(EXG2ANTTLib.NumericEnum.exDisableSigns) Or Integer(EXG2ANTTLib.NumericEnum.exFloatInteger);
		end;
		h := AddItem('Float (mask,group)');
		CellValue[TObject(h),TObject(1)] := '10002.34';
		FormatCell[TObject(h),TObject(1)] := 'value format `2`';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.MaskType;
			Mask := ';;;float,invalid=empty,warning=invalid character';
		end;
		h := AddItem('Float (mask, no group)');
		CellValue[TObject(h),TObject(1)] := '10002.34';
		FormatCell[TObject(h),TObject(1)] := 'value format `2|0|`';
		with CellEditor[TObject(h),TObject(1)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.MaskType;
			Mask := ';;;float,grouping=,invalid=empty,warning=invalid character';
		end;
	end;
	EndUpdate();
end
2130
Is it possible to offset (horizontally) the bar's caption

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('HOffset');
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
		FirstVisibleDate := '12/16/2000';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			Color := $a4a4a4;
			StartColor := $f0f0f0;
			EndColor := StartColor;
			Height := 15;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'label';
		end;
	end;
	with Items do
	begin
		h := AddItem('right');
		AddBar(h,'Task','12/22/2000','12/27/2000',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(2);
		h := AddItem('right - 4');
		AddBar(h,'Task','12/22/2000','12/27/2000',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(2);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaptionHOffset] := TObject(-4);
		h := AddItem('left');
		AddBar(h,'Task','12/22/2000','12/27/2000',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
		h := AddItem('left + 4');
		AddBar(h,'Task','12/22/2000','12/27/2000',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaptionHOffset] := TObject(4);
	end;
	EndUpdate();
end
2129
Is it possible to always center the bar's caption (even if the item-bar is partially visible)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Align');
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
		FirstVisibleDate := '12/23/2000';
		LevelCount := 2;
		PaneWidth[False] := 128;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			Color := $a4a4a4;
			StartColor := $f0f0f0;
			EndColor := StartColor;
			Height := 15;
		end;
	end;
	with Items do
	begin
		h := AddItem('default');
		AddBar(h,'Task','12/22/2000','12/27/2000','','label');
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(1);
		h := AddItem('default + 32');
		AddBar(h,'Task','12/22/2000','12/27/2000','','label');
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(33);
	end;
	EndUpdate();
end
2128
How do I set an extra data for each item
// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		OutputDebugString( i );
		OutputDebugString( Items.ItemData[i] );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Columns.Add('Default');
	with Items do
	begin
		ItemData[AddItem('method 1')] := 'your extra data of method 1';
		InsertItem(0,'your extra data of method 2','method 2');
	end;
	with Items do
	begin
		DefaultItem := AddItem('method 3');
		ItemData[0] := 'your extra data of method 3';
	end;
	EndUpdate();
end
2127
Is it possible to show the position of rows the into the chart section

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
procedure TWinForm1.AxG2antt1_BeforeExpandItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BeforeExpandItemEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Indent := 16;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	ScrollBySingleLine := True;
	FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel;
	Columns.Add('Tasks');
	with (Columns.Add('Pos') as EXG2ANTTLib.Column) do
	begin
		Visible := False;
		FormatColumn := '`<r><bgcolor 000000><fgcolor FFFFFF> ` + 1 apos `` + ` </fgcolor></bgcolor>`';
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
	end;
	with Chart do
	begin
		ColumnsFormatLevel := ',|,1:64';
		FirstVisibleDate := '9/20/2006';
		ShowCollapsedBars := True;
		LevelCount := 2;
		PaneWidth[False] := 128;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
			Color := $0;
			StartColor := $c4c4c4;
			EndColor := $c4c4c4;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
		end;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		h1 := InsertItem(h,Nil,'Resources');
		AddBar(h1,'Task','9/21/2006','9/25/2006','A',Nil);
		AddBar(h1,'Task','9/24/2006','9/28/2006','B',Nil);
		AddBar(h1,'Task','9/27/2006','9/29/2006','C',Nil);
		h := AddItem('Project 2');
		h1 := InsertItem(h,Nil,'Resources');
		AddBar(h1,'Task','9/21/2006','9/25/2006','A',Nil);
		AddBar(h1,'Task','9/24/2006','9/28/2006','B',Nil);
		AddBar(h1,'Task','9/27/2006','9/29/2006','C',Nil);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2126
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

with AxG2antt1 do
begin
	BeginUpdate();
	AttachTemplate('handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}');
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesVSolid;
	with Columns do
	begin
		Add('Item');
		with (Add('Pos') as EXG2ANTTLib.Column) do
		begin
			Position := 0;
			Width := 32;
			AllowSizing := False;
			FormatColumn := '1 index ``';
		end;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	EndUpdate();
end
2125
Stack vs Cascade

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	Columns.Add('Type');
	BackColorAlternate := Color.FromArgb(240,240,240);
	with Chart do
	begin
		LevelCount := 2;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		AllowLinkBars := False;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		Bars.Copy('Task','Stack').OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
		Bars.Copy('Task','AStack').OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
		Bars.Copy('Task','Cascade').OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsCascade;
	end;
	with Items do
	begin
		h := AddItem('Stack');
		AddBar(h,'Stack','1/2/2001','1/4/2001','A1',Nil);
		AddBar(h,'Stack','1/3/2001','1/5/2001','A2',Nil);
		AddBar(h,'Stack','1/4/2001','1/7/2001','A3',Nil);
		AddBar(h,'Stack','1/2/2001','1/7/2001','A4',Nil);
		AddBar(h,'Stack','1/8/2001','1/12/2001','A5',Nil);
		AddItem(Nil);
		h := AddItem('Stack-AutoArrange');
		AddBar(h,'AStack','1/2/2001','1/4/2001','A1',Nil);
		AddBar(h,'AStack','1/3/2001','1/5/2001','A2',Nil);
		AddBar(h,'AStack','1/4/2001','1/7/2001','A3',Nil);
		AddBar(h,'AStack','1/2/2001','1/7/2001','A4',Nil);
		AddBar(h,'AStack','1/8/2001','1/12/2001','A5',Nil);
		AddItem(Nil);
		h := AddItem('Cascade');
		AddBar(h,'Cascade','1/2/2001','1/4/2001','A1',Nil);
		AddBar(h,'Cascade','1/3/2001','1/5/2001','A2',Nil);
		AddBar(h,'Cascade','1/4/2001','1/7/2001','A3',Nil);
		AddBar(h,'Cascade','1/2/2001','1/7/2001','A4',Nil);
		AddBar(h,'Cascade','1/8/2001','1/12/2001','A5',Nil);
		AddItem(Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%9%>';
	end;
	EndUpdate();
end
2124
How can I change the Exclude field in the drop down filter window

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	set_HTMLPicture('exclude','gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnTb' + 
	'uHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1ATC' + 
	'gCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA==');
	set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarExclude,'<img>exclude</img>');
	with (Columns.Add('Items') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox);
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
	end;
	EndUpdate();
end
2123
How can I change the Exclude field in the drop down filter window

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarExclude,'<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>');
	with (Columns.Add('Items') as EXG2ANTTLib.Column) do
	begin
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox);
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
	end;
	EndUpdate();
end
2122
The grid lines looks different then before. What should I do

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric;
	Chart.DrawGridLines := AxG2antt1.DrawGridLines;
	Chart.GridLineStyle := AxG2antt1.GridLineStyle;
	HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
	with Items do
	begin
		h := AddItem('Project');
		hChild := InsertItem(h,Nil,'Task 1');
		SelectItem[hChild] := True;
		hChild := InsertItem(h,Nil,'Task 2');
		CellState[TObject(hChild),TObject(0)] := 1;
		hChild := InsertItem(h,Nil,'Task 3');
		CellState[TObject(hChild),TObject(0)] := 1;
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2121
How can I hide the task/bar's extra-caption

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2011';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<%=%C0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
		end;
	end;
	Columns.Add('Task');
	with (Columns.Add('Show') as EXG2ANTTLib.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
			Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1);
		end;
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(57);
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2011','1/7/2011',Nil,Nil);
		ItemBar[FirstVisibleItem,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowExtraCaption] := TObject(False);
		AddBar(AddItem('Task 2'),'Task','1/4/2011','1/8/2011',Nil,Nil);
	end;
	EndUpdate();
end
2120
How can I hide the task/bar's caption

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2011';
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%C0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
	end;
	Columns.Add('Task');
	with (Columns.Add('Show') as EXG2ANTTLib.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
			Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1);
		end;
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(56);
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2011','1/7/2011',Nil,Nil);
		ItemBar[FirstVisibleItem,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowCaption] := TObject(False);
		AddBar(AddItem('Task 2'),'Task','1/4/2011','1/8/2011',Nil,Nil);
	end;
	EndUpdate();
end
2119
Can I sort the column by check-state

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Check') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		SortType := EXG2ANTTLib.SortTypeEnum.exSortByState;
	end;
	with Items do
	begin
		AddItem(Nil);
		CellState[TObject(AddItem(Nil)),TObject(0)] := 1;
		CellState[TObject(AddItem(Nil)),TObject(0)] := 1;
		AddItem(Nil);
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
2118
Can I sort the column by image

with AxG2antt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (Columns.Add('Image') as EXG2ANTTLib.Column) do
	begin
		SortType := EXG2ANTTLib.SortTypeEnum.exSortByImage;
	end;
	with Items do
	begin
		CellImage[TObject(AddItem(Nil)),TObject(0)] := 3;
		AddItem(Nil);
		CellImage[TObject(AddItem(Nil)),TObject(0)] := 1;
		CellImage[TObject(AddItem(Nil)),TObject(0)] := 2;
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
2117
Can I sort the column by value(numeric)

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Value') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		FormatColumn := '`<fgcolor=808080><off 4><font ;6> ` + (1 index ``)  + ` </font></off></fgcolor>` + value';
		SortType := Integer(EXG2ANTTLib.SortTypeEnum.exSortByValue) Or Integer(EXG2ANTTLib.SortTypeEnum.SortNumeric);
	end;
	with Items do
	begin
		AddItem('1');
		AddItem('10');
		AddItem('2');
		AddItem('20');
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
2116
Can I sort a column by cell's state (checked, unchecked) rather than caption

with AxG2antt1 do
begin
	BeginUpdate();
	with (Columns.Add('Check') as EXG2ANTTLib.Column) do
	begin
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
			Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1);
		end;
		SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
	end;
	with Items do
	begin
		AddItem(TObject(True));
		AddItem(TObject(False));
		AddItem(TObject(False));
		AddItem(TObject(True));
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
2115
How can I highlight(bold) the items that displays milestones (method 2)

with AxG2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('Tasks');
		(Add('Start') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		(Add('End') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(543);
		with (Add('Days') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258);
			FormatColumn := 'value ? value : ``';
		end;
		with (Add('Type') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(0);
			Visible := False;
		end;
	end;
	with ConditionalFormats.Add('%4 = `Milestone`',Nil) do
	begin
		Bold := True;
		Italic := True;
		ApplyTo := EXG2ANTTLib.FormatApplyToEnum.exFormatToItems;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2010';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('M1'),'Milestone','9/24/2010','9/24/2010',Nil,Nil);
		AddBar(AddItem('T1'),'Task','9/24/2010','9/28/2010',Nil,Nil);
		AddBar(AddItem('T2'),'Task','9/27/2010','9/28/2010',Nil,Nil);
		AddBar(AddItem('M3'),'Milestone','9/28/2010','9/28/2010',Nil,Nil);
	end;
	EndUpdate();
end
2114
How can I highlight(bold) the items that displays milestones (method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('Tasks');
		(Add('Start') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		(Add('End') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(543);
		with (Add('Days') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258);
			FormatColumn := 'value ? value : ``';
		end;
	end;
	with ConditionalFormats.Add('%3 = 0',Nil) do
	begin
		Bold := True;
		Italic := True;
		ApplyTo := EXG2ANTTLib.FormatApplyToEnum.exFormatToItems;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2010';
		LevelCount := 2;
		PaneWidth[False] := 256;
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('M1'),'Milestone','9/24/2010','9/24/2010',Nil,Nil);
		AddBar(AddItem('T1'),'Task','9/24/2010','9/28/2010',Nil,Nil);
		AddBar(AddItem('T2'),'Task','9/27/2010','9/28/2010',Nil,Nil);
		AddBar(AddItem('M3'),'Milestone','9/28/2010','9/28/2010',Nil,Nil);
	end;
	EndUpdate();
end
2113
Bars with gradient shows no border or frame arround. What can be done (method 2)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 48;
	DefaultItemHeight := 24;
	with Chart.Bars.Add('E1') do
	begin
		Color := $0;
		StartColor := $ff00;
		EndColor := $ffff;
		Pattern := Integer(EXG2ANTTLib.PatternEnum.exPatternGradientVBox) Or Integer(EXG2ANTTLib.PatternEnum.exPatternBox);
		Height := 20;
	end;
	with Chart.Bars.Add('E2') do
	begin
		Color := $0;
		StartColor := $ff00;
		EndColor := $ffff;
		Pattern := Integer(EXG2ANTTLib.PatternEnum.exPatternGradientVBox) Or Integer(EXG2ANTTLib.PatternEnum.exPatternBox);
		Height := 20;
		Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := '[frame=RGB(255,0,0),framethick]';
	end;
	with Items do
	begin
		AddItem(Nil);
		h := AddItem('no border');
		AddBar(h,'E1','1/2/2001','1/8/2001','',Nil);
		h := AddItem('w/h boder');
		AddBar(h,'E2','1/2/2001','1/8/2001','',Nil);
		AddItem(Nil);
	end;
	EndUpdate();
end
2112
Bars with gradient shows no border or frame arround. What can be done (method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 48;
	DefaultItemHeight := 24;
	with Chart.Bars.Add('E2') do
	begin
		Color := $0;
		StartColor := $ff00;
		EndColor := $ffff;
		Pattern := Integer(EXG2ANTTLib.PatternEnum.exPatternGradientVBox) Or Integer(EXG2ANTTLib.PatternEnum.exPatternBox);
		Height := 20;
	end;
	with Items do
	begin
		AddItem(Nil);
		h := AddItem('no border');
		AddBar(h,'E2','1/2/2001','1/8/2001','',Nil);
		h := AddItem('w/h boder');
		AddBar(h,'E2','1/2/2001','1/8/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := '[frame=RGB(255,0,0),framethick]';
		AddItem(Nil);
	end;
	EndUpdate();
end
2111
Is it possible to display auto-numbers (rows-numbers) for non-empty items only

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[False] := 128;
	with Columns do
	begin
		Add('Items');
		with (Add('Pos') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := 'len(%C0) ? 1 pos `` : ``';
			Position := 0;
		end;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('');
		AddItem('Item B');
		AddItem('');
		AddItem('Item C');
	end;
	EndUpdate();
end
2110
Is it possible to separate the group of items using horizontal-lines (root-items)

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABLEIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRiAUbQSKEPxLEiPmqSHIEWwtDiBZgieTpNhAMg1CTNU4RAKoYR' + 
	'zBKeZ7kGZIVjKMofURRDpxBBMAkB');
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DefaultItemHeight := 24;
	SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 196;
		SelBackColor := AxG2antt1.SelBackColor;
	end;
	with Columns do
	begin
		with (Add('Default') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			PartialCheck := True;
		end;
		with (Add('Position') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 + ((1 rpos ``) contains `.`)';
			Visible := False;
		end;
	end;
	with ConditionalFormats.Add('%C1',Nil) do
	begin
		BackColor := $1000000;
		ChartBackColor := BackColor;
	end;
	with Items do
	begin
		h := AddItem('Group 1');
		AddBar(InsertItem(h,Nil,'Child 1'),'Task','1/3/2001','1/13/2001',Nil,Nil);
		AddBar(InsertItem(h,Nil,'Child 2'),'Task','1/4/2001','1/14/2001',Nil,Nil);
		ExpandItem[h] := True;
		h := AddItem('Group 2');
		AddBar(InsertItem(h,Nil,'Child 1'),'Task','1/3/2001','1/13/2001',Nil,Nil);
		AddBar(InsertItem(h,Nil,'Child 2'),'Task','1/4/2001','1/14/2001',Nil,Nil);
	end;
	EndUpdate();
end
2109
How can specify a black pattern for the task

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 22;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 0;
	end;
	Columns.Add('Frames');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/12/2001','bar A',Nil);
		ItemBar[h,'bar A',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(1);
		AddBar(h,'Task','1/14/2001','1/24/2001','bar B',Nil);
	end;
	EndUpdate();
end
2108
Can I define a bar so it automatically fills the current item/row height (same height)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Height := -1;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A'),'Task','1/2/2001','1/5/2001',Nil,Nil);
		h := AddItem('Task A');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
	end;
	EndUpdate();
end
2107
How can I highlight a specified date for the entire chart (Method 2)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 96;
		UnitWidth := 18;
		LevelCount := 2;
		MarkTimeZone('zone1','1/8/2001','1/9/2001',TObject(0),Nil);
		MarkTimeZone('zone2','1/2/2001','1/4/2001',TObject(0),'50');
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('Task(I)');
		AddBar(h,'Task','1/5/2001','1/12/2001','I',Nil);
		AddItem('');
	end;
	EndUpdate();
end
2106
How can I highlight a specified date for the entire chart, including the header (Method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 96;
		UnitWidth := 18;
		LevelCount := 2;
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		with DefaultInsideZoomFormat do
		begin
			ForeColor := $ffffff;
			BackColorChart := $10000;
			BackColor := $10000;
		end;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/8/2001').AllowInsideFormat := False;
		end;
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('Task(I)');
		AddBar(h,'Task','1/5/2001','1/12/2001','I',Nil);
		AddItem('');
	end;
	EndUpdate();
end
2105
How can I highlight a specified date of a specified item

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 96;
		UnitWidth := 18;
		LevelCount := 2;
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('Task(D)');
		AddBar(h,'Task','1/5/2001','1/12/2001','D',Nil);
		AddItem('');
	end;
	with Chart.Notes do
	begin
		with Add('NoteD',TObject(h),'1/8/2001','<b><%dd%></b><br><%m%><br><%yy%>') do
		begin
			PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 18;
			PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
		end;
	end;
	EndUpdate();
end
2104
How can I display the start/end of the task within its margins (notes)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 96;
		UnitWidth := 18;
		LevelCount := 2;
	end;
	with Items do
	begin
		AddItem('');
		h := AddItem('Task(T)');
		AddBar(h,'Task','1/5/2001','1/12/2001','T',Nil);
		AddItem('');
	end;
	with Chart.Notes do
	begin
		with Add('NoteTS',TObject(h),'T','') do
		begin
			ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
			PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<%d%>';
			PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 9;
			PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
		end;
		with Add('NoteTE',TObject(h),'T','') do
		begin
			RelativePosition := 'E-1';
			ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
			PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<%d%>';
			PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 9;
			PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
		end;
	end;
	EndUpdate();
end
2103
Is it possible to show the tasks not-overlaid when the item is collapsed and overlaid once the user expands the item

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
procedure TWinForm1.AxG2antt1_BeforeExpandItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BeforeExpandItemEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Indent := 16;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		ShowCollapsedBars := True;
		LevelCount := 2;
		PaneWidth[False] := 128;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		with Bars.Item['Task'] do
		begin
			OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
			Color := $0;
			StartColor := $c4c4c4;
			EndColor := $c4c4c4;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
		end;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		h1 := InsertItem(h,Nil,'Resources');
		AddBar(h1,'Task','9/21/2006','9/25/2006','A',Nil);
		AddBar(h1,'Task','9/24/2006','9/28/2006','B',Nil);
		AddBar(h1,'Task','9/27/2006','9/29/2006','C',Nil);
		h := AddItem('Project 2');
		h1 := InsertItem(h,Nil,'Resources');
		AddBar(h1,'Task','9/21/2006','9/25/2006','A',Nil);
		AddBar(h1,'Task','9/24/2006','9/28/2006','B',Nil);
		AddBar(h1,'Task','9/27/2006','9/29/2006','C',Nil);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
2102
Is it possible to display the label of the level without truncating / no clip

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exSunday;
		FirstVisibleDate := '12/31/2000';
		PaneWidth[False] := 0;
		LevelCount := 3;
		with Level[0] do
		begin
			Label := TObject(16);
			FormatLabel := '`<c>` + value';
		end;
		with Level[1] do
		begin
			Label := TObject(256);
			FormatLabel := '`<c>` + value';
		end;
		with Level[2] do
		begin
			Alignment := EXG2ANTTLib.AlignmentEnum($100);
			FormatLabel := 'weekday(dvalue) = 0 ? `<b>` + value : ``';
			DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
			DrawTickLinesFrom(1,EXG2ANTTLib.LevelLineEnum.exLevelDotLine);
			DrawGridLines := True;
		end;
		UnitWidth := 6;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	end;
	EndUpdate();
end
2101
How do I get the item's auto-number, when using FormatColumn property, as CellValue gets empty

// SelectionChanged event - Fired after a new item has been selected.
procedure TWinForm1.AxG2antt1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( 'pos: ' );
			OutputDebugString( CellCaption[TObject(FocusItem),TObject(1)] );
			OutputDebugString( 'rpos(1): ' );
			OutputDebugString( CellCaption[TObject(FocusItem),TObject(2)] );
			OutputDebugString( 'rpos(2): ' );
			OutputDebugString( CellCaption[TObject(FocusItem),TObject(3)] );
			OutputDebugString( 'apos: ' );
			OutputDebugString( CellCaption[TObject(FocusItem),TObject(4)] );
			OutputDebugString( 'index: ' );
			OutputDebugString( CellCaption[TObject(FocusItem),TObject(5)] );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	with Columns do
	begin
		Add('Items');
		with (Add('pos') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 pos ``';
			Position := 0;
			Width := 48;
			AllowSizing := False;
		end;
		with (Add('rpos(1)') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 rpos ``';
			Position := 1;
			Width := 48;
			AllowSizing := False;
		end;
		with (Add('rpos(2)') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 rpos `.||A-Z`';
			Position := 2;
			Width := 48;
			AllowSizing := False;
		end;
		with (Add('apos') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 apos ``';
			Position := 3;
			Width := 48;
			AllowSizing := False;
		end;
		with (Add('index') as EXG2ANTTLib.Column) do
		begin
			FormatColumn := '1 index ``';
			Position := 4;
			Width := 48;
			AllowSizing := False;
		end;
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		InsertItem(h,Nil,'Child 1');
		hSel := InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	EndUpdate();
	Items.SelectItem[hSel] := True;
end